package com.cdyx.outsideprescription.util;

import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.HashMap;
import java.util.Map;

public class PageInfo {
    public static Map<String,Long> getPageInfo(IPage ipage){
       Map<String,Long> pageInfo=new HashMap<>();
        long pages = ipage.getPages();
        long total = ipage.getTotal();
        long current = ipage.getCurrent();
        long size = ipage.getSize();
        pageInfo.put("pages",pages);
        pageInfo.put("total",total);
        pageInfo.put("current",current);
        pageInfo.put("size",size);
        return pageInfo;
    }
}
